home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / CUGUK / COMMS / C101.ZIP / UUPC11XS.ZIP / UUCICO / UUCICO.C < prev    next >
C/C++ Source or Header  |  1992-11-12  |  4KB  |  107 lines

  1. /*
  2.  * History:4,1
  3.  * Mon May 15 19:56:44 1989 Add c_break handler                   ahd
  4.  * 20 Sep 1989 Add check for SYSDEBUG in MS-DOS environment       ahd
  5.  * 22 Sep 1989 Delete kermit and password environment
  6.  *             variables (now in password file).                  ahd
  7.  * 30 Apr 1990  Add autoedit support for sending mail              ahd
  8.  *  2 May 1990  Allow set of booleans options via options=         ahd
  9.  * 29 Jul 1990  Change mapping of UNIX to MS-DOS file names        ahd
  10.  * 03 Mar 1992  Replace with new Signal handler for Ctrl C         ahd
  11.  */
  12.  
  13. /*--------------------------------------------------------------------*/
  14. /*                        System include files                        */
  15. /*--------------------------------------------------------------------*/
  16.  
  17. #include <dos.h>
  18. #include <signal.h>
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <string.h>
  22. #include <time.h>
  23.  
  24. /*--------------------------------------------------------------------*/
  25. /*                    UUPC/extended include files                     */
  26. /*--------------------------------------------------------------------*/
  27.  
  28. #include "lib.h"
  29. #include "dcp.h"
  30. #include "hlib.h"
  31. #include "hostable.h"
  32. #include "security.h"
  33. #include "pushpop.h"
  34. #include "timestmp.h"
  35. #include "catcher.h"
  36.  
  37. #ifdef WIN32
  38. #include "win32.h"
  39. #endif
  40.  
  41. currentfile();
  42.  
  43. /*--------------------------------------------------------------------*/
  44. /*    m a i n                                                         */
  45. /*                                                                    */
  46. /*    Main program for UUCICO                                         */
  47. /*--------------------------------------------------------------------*/
  48.  
  49. void main( int argc, char *argv[])
  50. {
  51.    int status;
  52.  
  53. /*--------------------------------------------------------------------*/
  54. /*          Report our version number and date/time compiled          */
  55. /*--------------------------------------------------------------------*/
  56.  
  57.    banner( argv );
  58.  
  59. #if defined(__CORE__)
  60.    copywrong = strdup(copyright);
  61.    checkref(copywrong);
  62. #endif
  63.  
  64.    if (!configure( B_UUCICO ))
  65.       panic();
  66.  
  67. /*--------------------------------------------------------------------*/
  68. /*                        Trap control C exits                        */
  69. /*--------------------------------------------------------------------*/
  70.  
  71.     if( signal( SIGINT, ctrlchandler ) == SIG_ERR )
  72.     {
  73.         printmsg( 0, "Couldn't set SIGINT\n" );
  74.         panic();
  75.     }
  76.  
  77. /*--------------------------------------------------------------------*/
  78. /*          In Windows/NT, set the console input mode to non-linebased*/
  79. /*--------------------------------------------------------------------*/
  80. #ifdef WIN32
  81.    setstdinmode();
  82. #endif
  83.  
  84.  
  85. /*--------------------------------------------------------------------*/
  86. /*                         Set our time zone                          */
  87. /*--------------------------------------------------------------------*/
  88.  
  89.    if (getenv("TZ") == NULL )
  90.    {
  91.       printmsg(0,"Environment variable TZ must be set!");
  92.       panic();
  93.    }
  94.    tzset();                      /* Set up time zone information  */
  95.  
  96.    PushDir(E_spooldir);
  97.    atexit( PopDir );
  98.  
  99. /*--------------------------------------------------------------------*/
  100. /*                   setup longjmp for error exit's                   */
  101. /*--------------------------------------------------------------------*/
  102.  
  103.    status = dcpmain(argc, argv);
  104.  
  105.    exit( status );
  106. } /*main*/
  107.